package com.jiang.annotation.valid.test.service.impl;


import com.jiang.annotation.valid.test.User;
import com.jiang.annotation.valid.test.service.ValidServiceA;
import com.jiang.annotation.valid.test.service.ValidServiceB;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.validation.constraints.Size;

@Service
public class ValidServiceAImpl implements ValidServiceA {

    @Resource
    private ValidServiceB validServiceB;

    public boolean saveUserA(User user){
        return Boolean.TRUE;
    }

    @Override
    public boolean saveUserAToB(User user) {
        return validServiceB.saveUserB(user);
    }

    @Override
    public void print(String name, String cardNo) {
        System.out.println(name + "---" + cardNo);
    }
}
